//
//  TKL_LoginViewModel.m
//  TKL_EnPro
//
//  Created by 雅恩三河科技 on 2018/12/11.
//  Copyright © 2018年 MrZhang. All rights reserved.
//

#import "TKL_LoginViewModel.h"

@implementation TKL_LoginInfoModel
@end
@interface TKL_LoginViewModel ()

@end

@implementation TKL_LoginViewModel
#pragma mark - getter and setter
#pragma mark - method
-(void)requsetLogin:(NSMutableDictionary *)para
{
    @WeakSelf;
    [[InterfaceManager shareInterface] requestAllInterface:@"http://101.201.171.131:8080/rest/api/user/login" para:para handler:^(NSDictionary *info, InterfaceStatusModel *infoModel) {
        if ([[info objectForKey:@"status"] integerValue]==0)
        {
            [selfp setInfoModel:[TKL_LoginInfoModel yy_modelWithJSON:[info objectForKey:@"data"]]];
            [selfp setIsLogin:YES];
        }else
        {
            [FTIndicator showErrorWithMessage:[info objectForKey:@"message"]];
        }
        NSLog(@"------%@",info);
    }];

}
#pragma mark - life
+(instancetype)shareInterface
{
    static TKL_LoginViewModel* model;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!model) {
            model=[TKL_LoginViewModel new];
        }
    });
    
    return model;
}
-(instancetype)init
{
    if (self = [super init]) {
        
    }
    return self;
}
#pragma mark - delegate
//http://101.201.171.131:8080/rest/api/home/tag/video/ 获取视频标签
//http://101.201.171.131:8080/rest/api/home/poster/list/ 获取视频列表  base=0&deviceType=1&order=1&page=1&tagId=30000&themeId=12&type=2
//http://101.201.171.131:8080/rest/api/home/poster/detail/  视频详情   posterUuid=5b5a48a9-59f0-40bd-b67b-5e4f81cee346
//http://101.201.171.131:8080/rest/api/home/poster/collect/ 收藏视频  collect=1&posterUuid=5b5a48a9-59f0-40bd-b67b-5e4f81cee346&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/poster/comment/list/ 视频评论列表  base=0&order=1&page=1&posterUuid=5b5a48a9-59f0-40bd-b67b-5e4f81cee346
//http://101.201.171.131:8080/rest/api/poster/comment/add/ 添加视频评论  content=good&posterUuid=5b5a48a9-59f0-40bd-b67b-5e4f81cee346&replyTo=0&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/community/poster/list 帖子列表    base=0&page=1
//http://101.201.171.131:8080/rest/api/photo/ossToken   阿里云穿图片 deviceType=1&type=1
//http://101.201.171.131:8080/rest/api/community/poster/publish 发布文章

//content    我爱你们
//cover    https://cosmotest.oss-cn-beijing.aliyuncs.com/img/community/cover/B00982B8-BE2E-4254-A49B-F59B172D3F6D.jpg
//longShort    1
//posterDraftId    0
//title    good morning
//topicIds    21
//userUuid    63e5eeec-588a-4c66-9356-ab7b4313a020

//http://101.201.171.131:8080/rest/api/community/comment/list  帖子评价列表    base=0&onlyLandlord=0&page=1&posterUuid=07d7b549-5752-498c-9a8d-b078229b3187
//http://101.201.171.131:8080/rest/api/user/report/add/ 举报帖子  content=%E5%BE%88%E5%A5%BD&userUuid=a1757652-fff9-4107-bbc9-c819b4d1a69d

//http://101.201.171.131:8080/rest/api/notice/message/list/ 消息列表   base=0&page=1&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/user/detail/ 用户详情  userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020

//http://101.201.171.131:8080/rest/api/home/poster/personal/ 收藏视频列表  base=0&page=1&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/community/poster/myList 我的帖子  base=0&longShort=1&page=1&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/community/poster/delete/ 文章删除 posterUuid=9e72665c-bd44-49e2-9fb0-9682c872b15a&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/user/feedback/add/ 意见反馈  content=%E5%93%88%E5%93%88%E5%93%88
// http://101.201.171.131:8080/rest/api/user/password/update/  修改密码  newPassword=e10adc3949ba59abbe56e057f20f883e&password=b7f68bc4597ea53d837c7952b6d041c1&uuid=63e5eeec-588a-4c66-9356-ab7b4313a020
//http://101.201.171.131:8080/rest/api/community/poster/collectList  收藏的帖子  //base=0&page=1&userUuid=63e5eeec-588a-4c66-9356-ab7b4313a020 
@end
